import * as actions from "../constants/requestActions";

export const openQYSAuth = () => {
    window.historyRoute.push("/center/doing/qysauth");
}

export const filterRequest4Forward = (submitFuncParams, submitParam, authActions) => {
    let filterResult = false;
    const authActionset = new Set([...authActions]);
    const {forwardflag} = submitFuncParams;
    if (forwardflag == "1") {     //转发
        if (authActionset.has(actions.REQUEST_FORWARD)) {
            filterResult = true;
        }
    } else if (forwardflag == "2") {       //意见征询
        if (authActionset.has(actions.REQUEST_TAKING_OPINIONS)) {
            filterResult = true;
        }
    } else if (forwardflag == "3") {
        if (authActionset.has(actions.REQUEST_HANDLE_FORWARD)) {      //转办
            filterResult = true;
        }
    }
    return filterResult;
}
